package countdownlatch;

import java.util.concurrent.CountDownLatch;

public class Test1 {
    public static void main(String[] args) {
        //创建countDownLatch对象
        CountDownLatch countDownLatch = new CountDownLatch(3);
        Mother m = new Mother(countDownLatch);
        m.start();

        ChileThread1 c1 = new ChileThread1(countDownLatch);
        c1.setName("小张");
        ChileThread2 c2 = new ChileThread2(countDownLatch);
        c2.setName("小雪");
        ChileThread3 c3 = new ChileThread3(countDownLatch);
        c3.setName("小小雪");

        c1.start();
        c2.start();
        c3.start();
    }
}
